Current video encoders (MPEG, H.264, etc) use a representation by blocks of the video sequence. The images are split into macroblocks, each macroblock is itself spilt into blocks and each block, or macroblock, is encoded by intra image or inter image prediction. Thus, some images are encoded by spatial prediction (intra prediction), while other images are encoded by temporal prediction (inter prediction) with respect to one or more reference encoded-decoded images, with the aid of a motion compensation known by the person skilled in the art.
For each block, there is encoded a residual block, also called prediction residue, corresponding to the original block reduced by a prediction. The residual blocks are transformed by a transform of the discrete cosine transform (DCT) type, then quantized using, for example, a scalar type quantization. Coefficients, some of which are positive and others negative, are obtained at the end of the quantization step. They are then scanned in a generally zigzag read order (as in the JPEG standard), thereby providing for exploiting the significant number of zero coefficients in the high frequencies. At this end of the aforementioned scan, a one-dimensional list of coefficients is obtained, which will be called “quantized residue”. The coefficients of this list are then encoded by an entropy encoding.
The entropy encoding (for example of the arithmetic coding or Huffman coding type) is carried out as follows:                an information item is entropically encoded in order to indicate the position of the last non-zero coefficient in the list,        for each coefficient located before the last non-zero coefficient, an information item is entropically encoded in order to indicate whether or not the coefficient is zero,        for each non-zero coefficient indicated previously, an information item is entropically encoded in order to indicate whether or not the coefficient is equal to one,        for each coefficient that is not zero and not equal to one, and located before the last non-zero coefficient, an amplitude information item (absolute value of the coefficient, which value is reduced by two) is entropically encoded,        for each non-zero coefficient, the sign assigned to it is encoded by a ‘0’ (for the + sign) or a ‘1’ (for the − sign).        
According to the H.284 technique for example, when a macroblock is split into blocks, a data signal, corresponding to each block, is transmitted to the decoder. Such a signal comprises:                the quantized residues contained in the abovementioned list,        information items representative of the encoding mode used, in particular:                    the prediction mode (intra prediction, inter prediction, default prediction producing a prediction for which no information is transmitted to the decoder (called “skip”);            information specifying the type of prediction (orientation, reference image, etc);            the type of partitioning;            the type of transform, for example 4×4 DCT, 8×8 DCT, etc;            the motion information if necessary;            etc.                        
The decoding is performed image by image, and for each image, macroblock by macroblock. For each partition of a macroblock, the corresponding elements of the stream are read. The inverse quantization and the inverse transformation of the coefficients of the blocks are performed to produce the decoded prediction residue. Then, the prediction of the partition is calculated and the partition is reconstructed by adding the prediction to the decoded prediction residue.
The intra or inter encoding by competition, as implemented in the H.264 standard, thus relies on piecing various encoding information items, such as those mentioned above, in competition with the aim of selecting the best mode, i.e. the one which will optimize the encoding of the partition in question according to a predetermined performance criterion, for example the rate distortion cost that is well known to the person skilled in the art.
The information items representative of the encoding mode selected are contained in the data signal transmitted by the encoder to the decoder. The decoder is thus capable of identifying the encoding mode selected at the encoder, then applying the prediction that conforms with this mode.
The document “Data Hiding of Motion information in Chroma and Luma Samples for Video Compression”, J.-M. Thiesse, J. Jung and M. Antonini, International workshop on multimedia signal processing, 2011, presents a data hiding method implemented during a video compression.
More specifically, it is proposed to avoid including in the signal to be transmitted to the decoder at least one competition index as issued from a plurality of competition indexes to be transmitted. Such an index is for example the index MVComp which represents an information item for identifying the motion vector predictor used for a block predicted in inter mode. Such an index which can take the value 0 or 1 is not included directly in the signal of encoded data items, but transported by the parity of the sum of the coefficients of the quantized residue. An association is created between the parity of the quantized residue and the index MVComp. By way of example, an even value of the quantized residue is associated win the index MVComp of value 0, while an odd value of the quantized residue is associated with the index MVComp of value 1. Two cases can arise, in a first case, if the parity of the quantized residue already corresponds to that of the index MVComp which is desired to be transmitted, the quantized residue is encoded conventionally. In a second case, if the parity of the quantized residue is different from that of the index MVComp which is desired to be transmitted, the quantized residue is modified such that its parity is the same as that of the index MVComp. Such a modification involves incrementing or decrementing one or more coefficients of the quantized residue by an odd value (e.g. +1, −1, +3, −3, +5, −5 etc) and retaining only the modification which optimizes a predetermined criterion, in this case the previously mentioned rate distortion cost.
At the decoder, the index MVComp is not read in the signal. The decoder is satisfied simply with conventionally determining the residue. If the value of this residue is even, the index MVComp is set to 0. If the value of this residue is odd, the index MVComp is set to 1.
In accordance with the technique that has just been presented, the coefficients which undergo the modification are not always chosen optimally, such that the modification applied brings about disturbances in the signal transmitted to the decoder. Such disturbances are inevitably detrimental to the effectiveness of the video compression.
An embodiment of the present invention relates to a method for encoding at least one image split into partitions, such a method implementing the steps of:                prediction of data items of a current partition as a function of at least one reference partition already encoded then decoded, delivering a predicted partition;        determination of a set of residual data items by comparison of data items relating to the current partition and the predicted partition, the residual data items being associated respectively with various digital information items which are intended to undergo an entropy encoding,        generation of a signal containing the encoded information items.        
The method according to the invention is notable in that it implements, prior to the signal generation step, the following steps:                determination, from the determined set of residual data items, of a subset containing residual data items suitable for being modified,                    calculation of the value of a function representative of the residual data items of said determined subset,            comparison of the calculated value with a value of at least one of the digital information items,            depending on the result of the comparison, modification or no modification of at least one of the residual data items of the subset,            in the event of modification, entropy encoding of the at least one modified residual data item.                        
Such an arrangement provides for applying a data hiding technique on a reduced set of residual data items, in which set the residual data items are suitable for being modified.
According to the invention, the expression “residual data items suitable for being modified” is understood to mean data items for which the application of a modification does not bring about desynchronization between the encoder and the decoder.
Thus, in accordance with the invention, the residual data items which are intended to undergo a modification are selected much mere reliably than in the previously cited prior art, thereby providing for obtaining a better qualify of reconstruction of the image at the decoder.
Moreover, the possibility of modifying a reduced number of residual data items provides for accelerating the encoding.
In a particular embodiment, the steps which follow the step for determining the subset of residual data items are implemented only if a predetermined criterion, dependent on the residual data items suitable for being modified, is met.
Such an arrangement additionally enables the encoder to decide in a rational manner whether or not it is appropriate to apply a data hiding technique. Such a decision step has the advantage of being applied only on the reduced set of residual data items suitable for being modified. It is thus ensured that the data hiding technique is applied much more appropriately than in the previously cited prior art in particular on a better chosen number of residual data items, for which it is certain that once these data items are modified, the disturbance of the signal generated by such a modification will not have a negative impact on the quality of the reconstruction of the image at the decoder.
In another particular embodiment, the predetermined decision criterion is dependent on the result of a comparison between the number of residual data items suitable for being modified and a predetermined number.
Such an arrangement provides for improving the compression performance of the arithmetic encoder while effectively reducing the signaling cost. Specifically, this arrangement provides for precisely detecting the number of residual data items from which it is judicious to apply the data hiding technique without the latter bringing about high disturbance levels in the signal to be transmitted to the decoder.
In yet another particular embodiment, if a plurality of digital information items is considered during the comparison step, the latter entails comparing the calculated value of a function representative of the residual data items of the determined subset with the value of a function representative of the plurality of digital information items.
Such an arrangement provides for optimizing the compression performance of the arithmetic encoder while optimizing the reduction in the signaling cost, since it provides for hiding several digital information items in the signal to be transmitted to the decoder.
In yet another particular embodiment the at least one digital information item corresponds to the sign of a residual data item.
The sign is a particularly relevant information item to be hidden due to the fact that the probability of appearance of a positive or negative sign is equiprobable. As such, given that a sign is necessarily encoded on one bit it is thus possible, by hiding this information, to economize one bit in the signal to be transmitted to the decoder, thereby substantially reducing the signaling cost. The reduction in such a cost will be all the more higher when it is possible according to the invention to hide a plurality of signs, and therefore a plurality of bits.
Correlatively, the invention relates also to a device for encoding at least one image split into partitions, such a device comprising:                means of prediction of data items of a current partition as a function of at least one reference partition already encoded then decoded, delivering a predicted partition,        means of determination of a set of residual data items suitable for comparing data items relating to the current partition and the predicted partition, the residual data items being associated respectively with various digital information items which are intended to undergo an entropy encoding,        means of generation of a signal containing the encoded information items.        
Such an encoding device is notable in that it comprises, upstream of the generation means, processing means which are able to:                determine, from the determined set of residual data items, a subset containing residual data items suitable for being modified,        calculate the value of a function representative of the residual data items of the determined subset,        compare the calculated value with a value of at least one of the digital information items,        modify or not modify at least one of the residual data items of the determined subset, depending on the result of the modification,as well as means for the entropy encoding of the at least one modified residual data item, in the event of modification by the processing means.        
In a corresponding way, the invention relates also to a method for decoding a data signal representative of at least one image split into partitions which has been previously encoded, comprising a step for obtaining, by the entropy decoding of data of the signal, digital information items associated with residual data items relating to at least one previously encoded partition.
Such a decoding method is notable in that it comprises the following steps:                determination, from the residual data items, of a subset containing residual data items able to have been modified during a previous encoding,        calculation of the value of a function representative of the residual data items of said determined subset,        obtaining of the value of at least one digital information item that is different from those obtained by entropy decoding, from the calculated value.        
In a particular embodiment, the steps which follow the step for determining the subset of residual data items are implemented only if a predetermined criterion, dependent on the residual data items able to have been modified, is met.
In another particular embodiment, the predetermined decision criterion is dependent on the result of a comparison between the number of residual data items able to have been modified and a predetermined number.
In yet another particular embodiment, a plurality of values associated respectively with a plurality of digital information items that are different from those obtained by entropy decoding is obtained from said calculated value.
In yet another particular embodiment, the at least one digital information item corresponds to the sign of a residual data item.
Correlatively, the invention relates also to a device for decoding a data signal representative of at least one image split into partitions which has been previously encoded, comprising means for obtaining, by the entropy decoding of data items of the signal digital information items associated with residual data items relating to at least one previously encoded partition.
Such a decoding device is notable in that it composes processing means which are able to:                determine, from said residual data items, a subset containing residual data items able to have been modified during a previous encoding,        calculate the value of a function representative of the residual data items of the determined subset,        obtain the value of at least one digital information item that is different from those obtained by entropy decoding, from the calculated value.        
The invention relates also to a computer program including instructions for the execution of the steps of the encoding or decoding method above, when the program is executed by a computer.
Such a program can use any programming language and be in the form of source code, object code or a code intermediate between source code and object code, such as in a partially compiled form or in any other desirable form.
Yet another subject of the invention is a recording medium readable by a computer and including instructions of a computer program as mentioned above.
The recording medium can be any entity or device capable of storing the program. For example, such a medium can include a storage means such as a ROM, for example a CD-ROM or a microelectronic circuit ROM, or a magnetic recording means, for example a floppy disk or a hard disk.
On the other hand, such a recording medium can be a transmittable medium such as an electrical or optical signal, which can be conveyed via an electrical or optical cable, via radio or via other means. The program according to the invention can in particular be downloaded over an internet type network.
Alternatively, such a recording medium can be an integrated circuit in which the program is incorporated, the circuit being adapted to execute the method in question or to be used in the execution of the latter.
The encoding device, the decoding method, the decoding device and the computer programs mentioned above exhibit at least the same advantages as those provided by the encoding method according to the present invention.